import request from '@/utils/request'

// 查询试卷与题目关联列表
export function listPaperTopic(query) {
  return request({
    url: '/course/paperTopic/list',
    method: 'get',
    params: query
  })
}

// 查询试卷与题目关联详细
export function getPaperTopic(paperId,topicId) {
  const query = {
    paperId,
    topicId
  }
  return request({
    url: '/course/paperTopic/getInfo',
    method: 'get',
    params: query
  })
}

// 新增试卷与题目关联
export function addPaperTopic(data) {
  return request({
    url: '/course/paperTopic',
    method: 'post',
    data: data
  })
}

// 修改试卷与题目关联
export function updatePaperTopic(data) {
  return request({
    url: '/course/paperTopic',
    method: 'put',
    data: data
  })
}

// 删除试卷与题目关联
export function delPaperTopic(paperId,topicId) {
  const data = {
    paperId,
    topicId
  }
  return request({
    url: '/course/paperTopic/delete',
    method: 'delete',
    data: data
  })
}
